/**
 * 进度条
 * @param a 宽度
 * @param b 高度
 * @constructor
 */
function ProgressBar(a, b) {
    this.initialize();
    this.w = a;
    this.h = b;
    this.progress = new createjs.Shape;
    this.progress.graphics.s("black").r(0, 0, a, b).es();
    this.progress.graphics.lf(["red", "yellow", "blue"], [0, 0.5, 1], 0, 0, a, 0);
    this.progressText = new createjs.Text("\u8d44\u6e90\u52a0\u8f7d\u4e2d..", "bold 24px Arial", "black");
    this.progressText.x = a / 2;
    this.progressText.y = b / 2;
    this.progressText.textAlign = "center";
    this.progressText.textBaseline = "middle";
    this.addChild(this.progress);
    this.addChild(this.progressText);
}
ProgressBar.prototype = new createjs.Container;  //创建容器
ProgressBar.prototype.completeCallback = function (a) {
    this.parent.removeChild(this);
};
ProgressBar.prototype.progressCallback = function (a) {
    this.progress.graphics.r(0, 0, this.w * a.progress, this.h);
    this.progressText.text = "\u5df2\u52a0\u8f7d: " + parseInt(100 * a.progress) + "%";
};
ProgressBar.prototype.forQueue = function (a) {
    this.errorList = [];
    a.on("complete", this.completeCallback, this, true);
    a.on("progress", this.progressCallback, this);
    a.on("error", function (a) {
        //alert("\xcd\xf8\xcb\xd9\xb2\xbb\xb8\xf8\xc1\xa6\xa3\xac\xcb\xa2\xd0\xc2\xd2\xbb\xcf\xc2\xb0\xc9!");
    }, null, true);
    a.on("error", function (a) {
        this.errorList.push(a.item.src);
    }, this);
};
//进度条/end